<template>
  <div>
    <el-carousel height="300px">
      <el-carousel-item
        v-for="item in slides"
        :key="item.id"
      >
        <img
          :src="item.src"
          class="carousel-img"
        >
        <h3>{{ item.title }}</h3>
      </el-carousel-item>
    </el-carousel>
    <div style="margin-top: 20px;">
      <blog-index></blog-index>
    </div>
  </div>
</template>
  
<script>
import pic1 from "@/assets/index/img1.jpg"
import pic2 from "@/assets/index/img2.jpg"
import BlogIndex from '@/index/blog/BlogIndex'

export default {
  name: 'index',
  components: {
    BlogIndex
  },
  data () {
    return {
      langs: ['en', 'cn', 'kr'],
      slides: [
        { id: 1, src: pic1, title: "标题1", text: "text1" },
        { id: 2, src: pic2, title: "标题1", text: "text1" },
      ]
    }
  }
}
</script>

<style scoped>
.el-carousel__item h3 {
  color: #475669;
  font-size: 18px;
  opacity: 0.75;
  line-height: 300px;
  margin: 0;
}

.el-carousel__item:nth-child(2n) {
  background-color: #99a9bf;
}

.el-carousel__item:nth-child(2n + 1) {
  background-color: #d3dce6;
}

.carousel-img {
  height: 100vh;
  width: 100%;
  object-fit: cover;
}
</style>